package com.example.Enum;

public class CommEnumImpl {

    public static <T extends CommEnum> T getCode(Integer code,Class<T> tClass){
        for(T e:tClass.getEnumConstants()){
            if(code.equals(e.getCode())){
                return e;
            }
        }
        return null;
    }

}
